package net.htjs.mobile.interfaces;

import java.util.List;

import net.htjs.mobile.Chess;
import net.htjs.mobile.Line;
import net.htjs.mobile.player.BasePlayer;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;

/**
 * 
 * @author Juforg
 * 
 */
public interface ChessBoardDao {

    public boolean isMyTurn(BasePlayer player,boolean currentPlayer);            		 //是否轮到某个玩家下
    
	public void drawChssboardLines(List<Line> lines ,Canvas canvas ,Paint paint);	 //画棋盘
	
	public void drawChess(Canvas canvas,int[][] chessArray,Bitmap[] chessColorArray,Paint paint);//画棋子
	
	public  void restart();										 //重新开始游戏
	
	public boolean isRunning(int currentStatus);									 //是否已开局
	
	public void playerRun(BasePlayer player, MotionEvent event);					//玩家下棋
	public void playerRun(BasePlayer player, Chess chess);
	
	public Chess generateChess(Float x , Float y);			//根据触摸点坐标找到对应点
	
	public void setPlayerRun(BasePlayer player);									//设置当前玩家
	public void setPlayerRun(boolean playerFlag);
	
	public void refressCanvas();								//触发onDraw函数
	
	public void fillChessArrays(Bitmap[] chessColorArray, int color, Drawable drawable, int chessSize);//初始化好三种颜色的点
	
	public void setStatus(int newStatus);					//设置运行状态
	
	public boolean setChess(Chess chess, boolean playerFlag);						
}
